﻿<%@ Page Language="C#" MasterPageFile="~/MangerPage.master" AutoEventWireup="true" CodeFile="Manger_ResourceType.aspx.cs" Inherits="Manger_ResourceType" Title="资源分类" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<div class="pagetitle">资源分类</div>
<asp:XmlDataSource ID="XmlDataSource1" runat="server" DataFile="~/xml/ResourceType_000000.xml"></asp:XmlDataSource>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:Jxzy_Database %>">
    </asp:SqlDataSource>
<div style="float:left"><asp:TreeView ID="TreeView1" runat="server" DataSourceID="XmlDataSource1" ShowLines="True" OnSelectedNodeChanged="TreeView1_SelectedNodeChanged">
        <DataBindings>
            <asp:TreeNodeBinding DataMember="siteMapNode" TextField="typename" ValueField="typeid" />
        </DataBindings>
        <ParentNodeStyle Font-Bold="False" />
        <HoverNodeStyle Font-Underline="True" ForeColor="#6666AA" />
        <SelectedNodeStyle BackColor="#C0C0FF" Font-Bold="True" Font-Underline="False" HorizontalPadding="0px"
            VerticalPadding="0px" />
        <NodeStyle Font-Names="Tahoma" Font-Size="8pt" ForeColor="Black" HorizontalPadding="5px"
            NodeSpacing="0px" VerticalPadding="1px" />
    </asp:TreeView></div>
    <div style="float:left">
        左边为通用模板新闻分类树形图，您可以进行添加、更新、删除操作。<br />
        选中节点为：<asp:TextBox ID="tbSelected" runat="server" ValidationGroup="1"></asp:TextBox>
        <asp:Button ID="btUpdate" runat="server" Text="更新节点" OnClick="btUpdate_Click" ValidationGroup="1" />
        <asp:RequiredFieldValidator ID="RequiredUpdate" runat="server" ControlToValidate="tbSelected"
            ErrorMessage="必须填写新名称" ValidationGroup="1"></asp:RequiredFieldValidator><br />
        <br />
        子节点名称：<asp:TextBox ID="tbNewNode" runat="server" ValidationGroup="2"></asp:TextBox>
        <asp:Button ID="btNew" runat="server" Text="添加子节点" OnClick="btNew_Click" ValidationGroup="2" />
        <asp:RequiredFieldValidator ID="RequiredNewNode" runat="server" ControlToValidate="tbNewNode"
            ErrorMessage="必须填写子节点名称！" ValidationGroup="2"></asp:RequiredFieldValidator><br />
        <br />
        <asp:Button ID="btMoveUp" runat="server" Text="上移节点" OnClick="btMoveUp_Click" />
        <asp:Button ID="btMoveDown" runat="server" Text="下移节点" OnClick="btMoveDown_Click" />
        <asp:Button ID="btDelete" runat="server" Text="删除节点" OnClick="btDelete_Click" />
        </div>
</asp:Content>

